From fd0ba51b6e64c22177517966ddaedb1f2a179075 Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Wed, 11 Jul 2007 10:48:15 +0100 Subject: [PATCH] Make QEMU consistently report write caching support for emulated IDE drives to fix a hang during SLES 9 HVM guest installation. Without this, the SLES 9 installer kernels (32 and 64 bit) were getting inconsistent information from QEMU as to whether the (emulated) IDE drives support write caching (which they do). So part of the kernel thought write caching was enabled (and enabled the usage of barrier writes) and part of it didn't, which triggered a bug in which the same barrier write is submitted over and over again ... Fixed by setting another bit in the WIN_IDENTIFY (IDE drive "identify" command) response to indicate we really, truly support write caching. Signed-off-by: David Lively Signed-off-by: Ben Guthro --- tools/ioemu/hw/ide.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/ioemu/hw/ide.c b/tools/ioemu/hw/ide.c index f681236b24..3b138c76e4 100644 --- a/tools/ioemu/hw/ide.c +++ b/tools/ioemu/hw/ide.c @@ -596,7 +596,8 @@ static void ide_identify(IDEState *s) /* 13=flush_cache_ext,12=flush_cache,10=lba48 */ put_le16(p + 83, (1 << 14) | (1 << 13) | (1 <<12) | (1 << 10)); put_le16(p + 84, (1 << 14)); - put_le16(p + 85, (1 << 14)); + /* 14=nop 5=write_cache */ + put_le16(p + 85, (1 << 14) | (1 << 5)); /* 13=flush_cache_ext,12=flush_cache,10=lba48 */ put_le16(p + 86, (1 << 14) | (1 << 13) | (1 <<12) | (1 << 10)); put_le16(p + 87, (1 << 14)); -- 2.30.2